package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CdTipoDocum generated by hbm2java
 */
@Entity
@Table(name = "CD_TIPO_DOCUM", schema = "CTROLDOC")
public class CdTipoDocum implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8286746902411144155L;
	private String ctipoExp;
	private String stipoExp;
	private Integer bagregaOrig;
	private Date fhingreso;
	private Date fhactualizacion;
	private String cusuario;
	private Set<CdDocAdmTrib> cdDocAdmTribs = new HashSet<CdDocAdmTrib>(0);
	private Set<CdInvAdmTrib> cdInvAdmTribs = new HashSet<CdInvAdmTrib>(0);
	private Set<CdDocumento> cdDocumentos = new HashSet<CdDocumento>(0);

	public CdTipoDocum() {
	}

	public CdTipoDocum(String ctipoExp, String stipoExp, Integer bagregaOrig,
			Date fhingreso, Date fhactualizacion, String cusuario) {
		this.ctipoExp = ctipoExp;
		this.stipoExp = stipoExp;
		this.bagregaOrig = bagregaOrig;
		this.fhingreso = fhingreso;
		this.fhactualizacion = fhactualizacion;
		this.cusuario = cusuario;
	}

	public CdTipoDocum(String ctipoExp, String stipoExp, Integer bagregaOrig,
			Date fhingreso, Date fhactualizacion, String cusuario,
			Set<CdDocAdmTrib> cdDocAdmTribs, Set<CdInvAdmTrib> cdInvAdmTribs,
			Set<CdDocumento> cdDocumentos) {
		this.ctipoExp = ctipoExp;
		this.stipoExp = stipoExp;
		this.bagregaOrig = bagregaOrig;
		this.fhingreso = fhingreso;
		this.fhactualizacion = fhactualizacion;
		this.cusuario = cusuario;
		this.cdDocAdmTribs = cdDocAdmTribs;
		this.cdInvAdmTribs = cdInvAdmTribs;
		this.cdDocumentos = cdDocumentos;
	}

	@Id
	@Column(name = "C_TIPO_EXP", unique = true, nullable = false, length = 1)
	public String getCtipoExp() {
		return this.ctipoExp;
	}

	public void setCtipoExp(String ctipoExp) {
		this.ctipoExp = ctipoExp;
	}

	@Column(name = "S_TIPO_EXP", nullable = false, length = 60)
	public String getStipoExp() {
		return this.stipoExp;
	}

	public void setStipoExp(String stipoExp) {
		this.stipoExp = stipoExp;
	}

	@Column(name = "B_AGREGA_ORIG", nullable = false, precision = 1, scale = 0)
	public Integer getBagregaOrig() {
		return this.bagregaOrig;
	}

	public void setBagregaOrig(Integer bagregaOrig) {
		this.bagregaOrig = bagregaOrig;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_ACTUALIZACION", nullable = false, length = 7)
	public Date getFhactualizacion() {
		return this.fhactualizacion;
	}

	public void setFhactualizacion(Date fhactualizacion) {
		this.fhactualizacion = fhactualizacion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdTipoDocum")
	public Set<CdDocAdmTrib> getCdDocAdmTribs() {
		return this.cdDocAdmTribs;
	}

	public void setCdDocAdmTribs(Set<CdDocAdmTrib> cdDocAdmTribs) {
		this.cdDocAdmTribs = cdDocAdmTribs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdTipoDocum")
	public Set<CdInvAdmTrib> getCdInvAdmTribs() {
		return this.cdInvAdmTribs;
	}

	public void setCdInvAdmTribs(Set<CdInvAdmTrib> cdInvAdmTribs) {
		this.cdInvAdmTribs = cdInvAdmTribs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdTipoDocum")
	public Set<CdDocumento> getCdDocumentos() {
		return this.cdDocumentos;
	}

	public void setCdDocumentos(Set<CdDocumento> cdDocumentos) {
		this.cdDocumentos = cdDocumentos;
	}

}
